<template>
  <div>
    <p>用户：<input type="text" v-model="form.user"></p>
    <p>密码：<input type="text" v-model="form.password"></p>
    <p>
      <button @click="login">登录</button></p>
  </div>
</template>

<script>
export default {
  name: "two",
  data() {
    return {
      form:{}
    }
  },
  methods: {
    login(){
      this.axios.get('reg/',this.form)
      .then(
        res=>{
          alert(res.data.msg)
          this.$router.push('three/',this.form.user)
        }
      )
    }
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>
